<?php defined('BASEPATH') or exit('No direct script access allowed');

class Post_model extends EXT_Model
{
	public $list_select = '*';
	public $list_filter_fields = array('id', 'ordering', 'title', 'category_id', 'created_by', 'source_id', 'type', 'created_time', 'published', 'hit');
	public $list_orderby = array('ordering asc', 'id desc');

	protected $_table = 'posts';

	public function __construct()
	{
		if($this->client)
		{
			$this->list_orderby = array('IF( published_up > created_time, published_up, created_time ) desc', 'created_time desc', 'id desc');
		}
		parent::__construct();
	}
}




